// Plugin_Max7.cpp : Defines the entry point for the DLL application.
//

#include "stdafx.h"

#include <windows.h>
#include <max.h>
int controlsInit = FALSE;
#define VERSION_3DSMAX ((MAX_RELEASE<<16)+(MAX_API_NUM<<8)+MAX_SDK_REV)
static MeltClassDesc MeltCD;


BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved) 

{ 

	// Hang on to this DLL's instance handle.

	hInstance = hinstDLL;

	if (! controlsInit) {

		controlsInit = TRUE;



		// Initialize MAX's custom controls

		InitCustomControls(hInstance);



		// Initialize Win95 controls

		InitCommonControls();

	}

	return(TRUE);

}

__declspec(dllexport) int LibNumberClasses() { return 1; }

__declspec(dllexport) ClassDesc *LibClassDesc(int i) {

	switch(i) {

  case 0: return &MeltCD;

  case 1: return &CrumpleCD;

  default: return 0;

	}

}

__declspec( dllexport ) const TCHAR *LibDescription() {

	return _T("Melt Modifier. Call 1-800-PLUG-INS to obtain a copy");

}

__declspec( dllexport ) ULONG LibVersion() { return VERSION_3DSMAX; }

class MeltClassDesc : public ClassDesc {

public:

	int     IsPublic() { return TRUE; }

	void *    Create(BOOL loading=FALSE) { return new MeltMod(); }

	const TCHAR *  ClassName() { return _T("Melt"); }

	SClass_ID   SuperClassID() { return OSM_CLASS_ID; }

	Class_ID   ClassID() { return Class_ID(0xA1C8E1D1, 0xE7AA2BE5); }

	const TCHAR*  Category() { return _T(""); }

};


void DeleteThis() { delete this; }

